<template>
	<div class="item-wrapper">
		<div 
			class="item" 
			v-for="(item,index) of list"
			:key="index"
		>
			<div class="item-title border-bottom">
				<span class="item-title-icon"></span>
				{{item.title}}
			</div>
			<div v-if="item.children" class="item-children">
				<detail-list :list="item.children"></detail-list>
			</div>
		</div>
	</div>
</template>

<script>
export default {
	name: "DetailList",
	props: {
		list: Array
	}
}
</script>

<style lang="stylus" scoped>
	.item-title
		line-height: .4rem
		font-size: .16rem
		padding: 0 .1rem
		background-color: #fff
		.item-title-icon
			position: relative
			left: .04rem
			top: .04rem
			display: inline-block
			width: .18rem
			height: .18rem
			background: url(http://s.qunarzz.com/piao/image/touch/sight/detail.png) 0 -.22rem no-repeat
			margin-right: .06rem
			background-size: .2rem 1.5rem		
	.item-children
		line-height: .4rem
		font-size: .16rem
		padding: 0 .1rem
		background-color: #fff	
</style>
